package com.lich.service;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.lich.dao.ProvincialMapper;
import com.lich.entity.Provincial;

@Service
public class ProvincialService {

	@Resource
	ProvincialMapper provincialMapper;
	
	public int getProvinceId(String name){
		Provincial provincial=provincialMapper.selectByName(name);
		if(provincial!=null){
			return provincial.getId();
		}else{
			return 0;
		}
	}
}
